﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MemeberMain.Master" AutoEventWireup="true" CodeBehind="AdminPage.aspx.cs" Inherits="outREACH.AdminPage" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder3" runat="server">
<script language=javascript>
    function CallPrint(strid) {
        var prtContent = document.getElementById(strid);
        var WinPrint = window.open('', '', 'letf=0,top=0,width=1000px,height=1000px,toolbar=0,scrollbars=0,status=0');
        WinPrint.document.write(prtContent.innerHTML);
        WinPrint.document.close();
        WinPrint.focus();
        WinPrint.print();
        WinPrint.close();
        prtContent.innerHTML = strOldOne;
    }
</script>
<div id="header-wrapper">
     
		<div id="header">
       
			<div id="menu">
            
				<ul>
					<li class="current_page_item"><a id="A1" href="~/HomeMem.aspx" runat="server">HOME</a></li>
					<li><a id="A2" href="~/Education/EducationMem.aspx" runat="server">EDUCATION</a></li>
					<li><a id="A3" href="~/Medical/MedicalMem.aspx" runat="server">MEDICAL</a></li>
					<li><a id="A4" href="~/Infrastructure/InfrastructureMem.aspx" runat="server">INFRA STRUCTURE</a></li>
					<li><a id="A5" href="~/Donation/DonationMem.aspx" runat="server">DONATION</a></li>
					<li><a id="A6" href="~/ContactUs_Mem.aspx" runat="server">CONTACT US</a></li>
				</ul>
               
			</div>
            
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
            <asp:ImageButton ID="ImageButton1" runat="server" Height="170px" 
                ImageUrl="~/Images/Untitled-2.png" Width="175px" 
                PostBackUrl="~/HomeMem.aspx" />
		</div>
	</div>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">

    <asp:Panel ID="Panel11" runat="server" Height="1030px" Font-Size="13pt" 
        ForeColor="Black">
        <asp:Label ID="don" runat="server" Font-Bold="True" Font-Italic="True" 
            Font-Size="20pt" Text="ADMIN - ADMIN PAGE"></asp:Label>
        <br />
        <br />
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <asp:Button ID="Button5" runat="server" 
            Text="Generate All Donation (Financial) Made" Width="307px" 
            Font-Size="12pt" onclick="Button5_Click" />
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <asp:Button ID="Button6" runat="server" onclick="Button6_Click" 
            OnClientClick="javascript:CallPrint('divPrint');" Text="Print" 
            Width="68px" Font-Size="12pt" style="height: 28px" />
        <br />
        <br />
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <asp:Button ID="Button7" runat="server" Text="Users Of This Site" 
            Font-Size="12pt" onclick="Button7_Click" />
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <asp:Button ID="Button8" runat="server" Font-Size="12pt" 
            onclick="Button8_Click" Text="Generate Email" />
        <br />
        <br />
        <div id="divPrint">
        <asp:Panel ID="Panel12" runat="server" Visible="False">
            <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
                DataSourceID="ObjectDataSource1" Height="223px" PageSize="20" 
                Width="600px" AllowPaging="True" align="center">
                <Columns>
                    <asp:BoundField DataField="userName" HeaderText="UserName" 
                        SortExpression="userName" />
                    <asp:BoundField DataField="amount" HeaderText="Amount (SGD$)" 
                        SortExpression="amount" />
                    <asp:BoundField DataField="paymentType" HeaderText="Payment Type" 
                        SortExpression="paymentType" />
                    <asp:BoundField DataField="countryToDonate" HeaderText="Country Donated To" 
                        SortExpression="countryToDonate" />
                    <asp:BoundField DataField="section" HeaderText="Section" 
                        SortExpression="section" />
                    <asp:BoundField DataField="dateTime" HeaderText="Date &amp; Time Donated" 
                        SortExpression="dateTime" />
                </Columns>
            </asp:GridView>
            <br />
        </asp:Panel>
        <br />
        
            <asp:Panel ID="Panel13" runat="server" Visible="False">
                <asp:GridView ID="GridView2" runat="server" AutoGenerateColumns="False" 
                    DataSourceID="ObjectDataSource2" PageSize="20" Width="570px" 
                    AllowPaging="True" align="center">
                    <Columns>
                        <asp:BoundField DataField="userName" HeaderText="UserName" 
                            SortExpression="role" />
                        <asp:BoundField DataField="firstName" HeaderText="First Name" 
                            SortExpression="role" />
                        <asp:BoundField DataField="lastName" HeaderText="Last Name" 
                            SortExpression="role" />
                        <asp:BoundField DataField="gender" HeaderText="Gender" SortExpression="role" />
                        <asp:BoundField DataField="email" HeaderText="Email" SortExpression="role" />
                        <asp:BoundField DataField="country" HeaderText="Country" 
                            SortExpression="role" />
                        <asp:BoundField DataField="dateJoin" DataFormatString="{0:d}" 
                            HeaderText="Date Join" SortExpression="role" />
                        <asp:BoundField DataField="role" HeaderText="Role" SortExpression="role" />
                    </Columns>
                </asp:GridView>
                <asp:ObjectDataSource ID="ObjectDataSource2" runat="server" 
                    SelectMethod="GetUser" TypeName="outREACH.App_Code.Users">
                </asp:ObjectDataSource>
                <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" 
                    OldValuesParameterFormatString="original_{0}" SelectMethod="getFinDonation" 
                    TypeName="outREACH.App_Code.FinDonation"></asp:ObjectDataSource>
            </asp:Panel>
            <asp:Panel ID="Panel14" runat="server" Visible="False">
                <br />
                Email:
                <asp:TextBox ID="TextBox2" runat="server" Width="366px"></asp:TextBox>
                <br />
                <br />
                Message:<br />
                <asp:TextBox ID="TextBox1" runat="server" Height="180px" TextMode="MultiLine" 
                    Width="650px"></asp:TextBox>
                <br />
                <br />
                <asp:Button ID="Button9" runat="server" Font-Size="12pt" 
                    onclick="Button9_Click" Text="Send" />
                <br />
            </asp:Panel>
        <br />
        <br />
        </asp:Panel>
    </div>
</asp:Content>
